|
|
@@ -42,6 +42,7 @@ public class CameraService extends Service {
|
42
|
42
|
|
43
|
43
|
private static final String MSG_TYPE_CAMERA_ERROR = "camero error";//相机错误,可能是线松动了。先exit,然后重新init
|
44
|
44
|
private static final String MSG_TYPE_NOT_INIT = "not init"; //需要初始化
|
|
45
|
+ private static final String MSG_TYPE_NAME_ERROR = "name error"; //继续调用waitforevent
|
45
|
46
|
private static final String MSG_TYPE_TIME_OUT = "time out"; //继续调用waitforevent
|
46
|
47
|
private static final String MSG_TYPE_CREATE_FILE_ERROR = "creat error";//照片文件创建失败
|
47
|
48
|
|
|
|
@@ -196,7 +197,7 @@ public class CameraService extends Service {
|
196
|
197
|
bundle.putInt(EXTRA_STATUS_PART, MSG_CAMERA_CONN_ERROR);
|
197
|
198
|
sendCameraIntent(bundle);
|
198
|
199
|
stopCameraService();
|
199
|
|
- }else if(MSG_TYPE_TIME_OUT.equalsIgnoreCase(eventMsg)){
|
|
200
|
+ }else if(MSG_TYPE_TIME_OUT.equalsIgnoreCase(eventMsg)||MSG_TYPE_NAME_ERROR.equalsIgnoreCase(eventMsg)){
|
200
|
201
|
count++;
|
201
|
202
|
if(count>=MAX_NO_PHOTO_COUNT){
|
202
|
203
|
LogHelper.d("czy","CameraService fetchPhotoTask 太久没发现新照片了,重新连接试试");
|